package com.itheima.read.anli;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;

public class Test {
    public static void main(String[] args) throws IOException {
        try (FileReader fr = new FileReader("D:\\java-base-ws\\JavaAdvanceProject\\day14_IO\\src\\com\\itheima\\read\\anli\\kun.txt");
                FileWriter fw = new FileWriter("D:\\java-base-ws\\JavaAdvanceProject\\day14_IO\\src\\com\\itheima\\read\\anli\\kun1.txt");
                ){


            int len;
            while ((len = fr.read()) != -1) {
               fw.write((char)len+"♥");
            }
        } catch (IOException e) {
            throw new RuntimeException(e);
        }


        System.out.println("文件读取完毕");
        System.out.println("========");

    }
}
